<%@page import="com.wanmait.shoppingsys.util.Favorite"%>
<%@page import="java.util.List"%>
<%@page import="com.wanmait.shoppingsys.vo.Specialty"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% String path = request.getServletContext().getContextPath(); %>
<jsp:include page="/inc/header.jsp"></jsp:include>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>天天生鲜-购物车</title>
	<link rel="stylesheet" type="text/css" href="css/reset.css">
	<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
	<div class="search_bar clearfix">
	<a href="<%=path %>/index.jsp" class="login_logo"><img src="<%=path %>/images/logo.png"></a>	
	</div>

	<div class="total_count"></div>	
	<div class="total_count">收藏夹</div>	
	<ul class="cart_list_th clearfix">
		<li class="col01">商品名称</li>
		<li class="col02">商品单位</li>
		<li class="col03">商品价格</li>
		<li class="col04">数量</li>
		<li class="col05">小计</li>
		<li class="col06">操作</li>
	</ul>
	<% Favorite fav = (Favorite)session.getAttribute("fav");
	if(fav!=null)
	{
		 List<Specialty> specialtys= fav.getSpecialtys();
		for(int i=0;i<specialtys.size();i++) 
		{
			Specialty specialty = specialtys.get(i);
			specialty.getName();
		%>	
			<ul class="cart_list_td clearfix">
				<li class="col01"><input type="checkbox" name="" checked></li>
				<li class="col02"><a href="<%=path %>/SpecialtyController?action=detailed&id=<%=specialty.getId() %>"><img src="<%=path %>/upload/goods/<%=specialty.getPic() %>"></a></li>
				<%
				 if(specialty.getTypeId()==3)
				{
				%>
					<li class="col03"><%=specialty.getName() %><br><em><%=specialty.getPrice() %>/瓶</em></li>
					<li class="col04">1&nbsp瓶</li>
				<% 	
				}
				else
				{
					%>
					<li class="col03"><%=specialty.getName() %><br><em><%=specialty.getPrice() %>/500g</em></li>
					<li class="col04">500g</li>
				<% 	
				}
				%>
				<li class="col05"><%=specialty.getPrice() %></li>
				<li class="col06">1</li>
				<li class="col07"><%=specialty.getPrice() %></li>
				<li class="col08"><a href="<%=path %>/ShopCarController?action=deletesomeone&id=<%=specialty.getId() %>">删除</a></li>
			</ul>
	<%
	}
		
	}
	%>
</body>
</html>
<jsp:include page="/inc/footer.jsp"></jsp:include>
				